package com.chenqing.baike.service.impl;
import com.chenqing.baike.mapper.LemmasMapper;
import com.chenqing.baike.pojo.Lemmas;
import com.chenqing.baike.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SearchServiceImpl implements SearchService {
    @Autowired
    private LemmasMapper lemmasMapper;
    @Override
    public boolean hasResult(String title) {
        List<Lemmas> lemmasList=lemmasMapper.getLemmasByTitleOrRedirect(title);

        return !lemmasList.isEmpty();
    }
}
